package org.karelun.ideaboard.edit.ui.cdo.action;

import org.eclipse.emf.cdo.view.CDOView;
import org.karelun.ideaboard.edit.ui.cdo.ITransactionEditingDomain;

public class RedoAction extends org.eclipse.emf.edit.ui.action.RedoAction{
	
	public RedoAction(){
		super();
	}
	
	public RedoAction(ITransactionEditingDomain editingDomain){
		super(editingDomain);
	}
	
	@Override
	public ITransactionEditingDomain getEditingDomain() {
		return (ITransactionEditingDomain)super.getEditingDomain();
	}
	
	@Override
	public void update() {
		CDOView cdoView = getEditingDomain().getCDOView();
		if(cdoView.isClosed()||cdoView.isReadOnly()){
			setEnabled(false);
		}else{
			super.update();
		}
	}
}
